package com.jaydenxiao.androidfire.utils;


import android.app.Dialog;
import android.content.Context;
import android.view.View;

import com.jaydenxiao.androidfire.R;


/**
 * Created by luoxiao on 2019/7/31.
 */
public class CustomDialog {

    public static Dialog show(Context context , View layout_res) {
        Dialog dialog =new Dialog(context, R.style.AlertDialogStyle);
        dialog.setContentView(layout_res);
        dialog.setCancelable(false);
        dialog.show();
        return dialog;
    }

    public static Dialog getinstance(Context context , View layout_res, int gravity) {
        Dialog dialog =new Dialog(context, R.style.AlertDialogStyle);
        dialog.getWindow().setGravity(gravity);
        dialog.setContentView(layout_res);
//        dialog.show();
        return dialog;
    }

}
